package routes

import (
	"github.com/astaxie/beego"
	"mdblog/controllers"
)

func init() {

	beego.Router("", &controllers.BlogController{}, "GET:Index")
	beego.Router("/login", &controllers.BlogController{}, "GET:Login")
	beego.Router("/article/:id", &controllers.BlogController{}, "GET:Article")
	beego.Router("/:classify", &controllers.BlogController{}, "GET:ClassifyArticles")
	beego.Router("/resource/:name", &controllers.BlogController{}, "GET:Resource")

	// blog api
	beego.Router("/api/login", &controllers.BlogApiController{}, "POST:Login")
	beego.Router("/api/logout", &controllers.BlogApiController{}, "POST:Logout")
}
